<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta content="telephone=no" name="format-detection" />
		<title>{$data['title']} - 彩票系统</title>
		<base href="{URL}" />
		<link href="static/css/ui-dialog.css" rel="stylesheet" />
		<link href="static/css/game.credit.css" rel="stylesheet" />
		<link href="static/css/flipclock.css" rel="stylesheet" />
		<link href="static/css/common.credit.css" rel="stylesheet" />
		<script src="static/js/jquery.min.js"></script>
		<script src="static/js/dialog-plus-min.js"></script>
		<script src="static/js/common.js"></script>
		<script src="static/js/utils.credit.min.js"></script>
	</head>
	
	<body id="body" class="body" data-gamename="{$data['title']}" data-gameid="{$data['id']}">
		<input type="hidden" id="accountId" value="{$_uid}" />		

		<div class="Ccenter">
			<div class="top">
				<div class="top_in clear">
					<div class="top_menu">
						<div class="clear">
							<a href="./" class="getout" title="返回首页"><span class="return_index">返回大厅</span></a>
							<a href="https://v88.live800.com/live800/chatClient/chatbox.jsp?companyID=801475&configID=5925&jid=4583178362&s=1" target="_blank" class="service" title="在线客服">
								<span class="new-msg" id="NewMsg">在线客服</span>
							</a>
							<a href="javascript:;" data-bind="click:viewRule" class="rule" id="Rule" title="规则说明"><i></i><span class="rule_description">规则说明</span></a>
							<a title="登出账号" class="btn-login-out" href="{U('member/login/logout')}"><span>登出账号</span></a>
						</div>
					</div>
					<div class="game_info game_{$data['id']}">
						<div class="game_ico game_ico_{$data['id']}"><img src="{$data['thumb']}" /></div>
						<div class="game_mane ">
							<span class="">{$data['title']}</span>
							{if $data['url']}
							<a href="{$data['url']}" target="_blank" title="官方网址" class="cn-btn"></a>
							{/if}
						</div>
						<div class="openinfo">
							<div class="drawNumber" id="PeriodInfo"><span class="c-period"><div>第 <b data-bind="text:periodInfo().fnumberofperiod">&nbsp;</b> 期</div><div class="time" data-bind="text:periodTip">&nbsp;</div></span> <span class="c-resttime" id="RestTime"></span></div><div id="RestTime2" style="display:none"></div>
							<div class="now_time" id="Clock"></div>
						</div>
					</div>
					<div class="lottery_result game_{$data['ptid']}">
						<div data-bind="foreach:{data:prevPeriodResult,afterRender:$root.lotteryEffect||$.noop}" id="LotteryResultBox" class="lr_ball_box">
							<span class="lottery-result-ball" data-bind="css:'ball_'+$data" style="position:relative;">
								<label data-bind="text:$data">&nbsp;</label>
								{if $data['id'] == 23}<span style="position:absolute;right:-1em;bottom:5px;color:#fff;font-weight:normal;font-size:12px;line-height:1" data-bind="text:$root.getZodiacFromBall($data)">&nbsp;</span>{/if}
							</span>
							{if $data['id'] == 23}<b class="result-plus" data-bind="if:$index()===5">+</b>{/if}
							{if $data['id'] == 42}
							<!--ko if:$index()!= $parent.prevPeriodResult().length -1--><span> + </span><!--/ko-->
                            <!--ko if:$index()== $parent.prevPeriodResult().length -1-->
                                <span> = </span>
                                <span class="lottery-result-ball" data-bind="css:'ball_'+(($parent.prevPeriodResult()[0] - 0) + ($parent.prevPeriodResult()[1] - 0) + ($parent.prevPeriodResult()[2] - 0))" style="position:relative;">
                                    <label data-bind="text:($parent.prevPeriodResult()[0] - 0) + ($parent.prevPeriodResult()[1] - 0) + ($parent.prevPeriodResult()[2] - 0)">&nbsp;</label>
                                </span>
                            <!--/ko-->
							{/if}
						</div>
						<div>
							<span class="lr_txt">第 <label data-bind="text:periodInfo().fpreviousperiod">&nbsp;</label> 期</span>
							<span class="lr_txt"><a target="_blank" href="{U('index/lottery/log',['id'=>$data['id']])}">开奖结果</a></span>
							<span class="vol-item">
								<a href="javascript:;" class="volume" data-bind="click:tracks.mute,css:'volume-'+(tracks.isMute()?'off':'on')"></a>
								<div class="Ringtone select-box">
									<div class="select-current"><span data-bind="text:tracks.trackName"></span><i></i></div>
									<select class="select-list" data-bind="options:tracks.list,value:tracks.track,optionsText:'name',optionsValue:'value'"></select>
								</div>
							</span>
						</div>
					</div>
				</div>
			</div>
			
			<div class="container clear" id="container">
				<div class="side">
					<div class="userbox">
						<ul class="stc_1 clear">
							<li class="mane">
								<span class="stc_t">账号：</span>
								<span class="stc_c">{$_user['username']}</span>
								<a href="javascript:;" class="ui-mgs-tip-box" style="display:none;" id="show_msg">99+</a>
							</li>
							<li class="balance">
								<span class="stc_t">余额：</span><span class="stc_c" id="AvailableBalance" data-bind="click:refreshBalance.bind($data,'latest')" style="cursor:pointer">{$_user['money']}</span>
							</li>
						</ul>
					</div>
					<div>
						<div class="acc-links clear" id="OpenNewWindow">
							<a title="在线存款" class="btn-navacc btn-navacc-deposit" href="{U('member/recharge')}" target="_blank"><span title="在线存款">充值</span></a>
							<a title="在线取款" class="btn-navacc btn-navacc-withdraw" id="jGetMoney" href="{U('member/cash')}" target="_blank"><span title="在线取款">提现</span></a>
							<a title="帐变记录" class="btn-navacc btn-navacc-mail" href="{U('member/money')}" target="_blank"><span title="帐变记录">帐变记录</span></a>
							<a title="游戏记录" class="btn-navacc btn-navacc-current" href="{U('member/order')}" target="_blank"><span>游戏记录</span></a>
							<a title="账户管理" class="btn-navacc btn-navacc-history" href="{U('member/info')}" target="_blank"><span>账户管理</span></a>
							<a title="会员中心" class="btn-navacc btn-navacc-center" href="{U('member')}" target="_blank"><span title="会员中心">会员中心</span></a>
						</div>
					</div>
					
					<div class="side-in">
						<div class="side_tab">
							<div class="" id="sideTab" style="overflow:hidden;">
								<div class="st_header clear" tab="header">
									<a href="javascript:;" class="active black_bg">开奖结果</a>
									<a href="javascript:;" class="black_bg">本期投注</a>
								</div>
								<div class="st_content" tab="content">
									<div class="side-result">
										<ul data-bind="foreach:resultHistoryList().slice(0,5),style:{display:resultHistoryList().length<=0?'none':''}">
											<li>
												<span class="sr-index" data-bind="text:$index()+1"></span>
												<span class="sr-period" data-bind="text:period"></span>
												<div class="sr-nums" data-bind="attr:{title:result}">
													<span><i data-bind="html:result"></i></span>
												</div>
											</li>
										</ul>
										<ul class="top10T" data-bind="style:{display:resultHistoryList().length>=5?'':'none'}"><a target="_blank" href="{U('index/lottery/log',['id'=>$data['id']])}">更多开奖结果</a></ul>
										<ul class="top10T" data-bind="style:{display:resultHistoryList().length<=0?'':'none'}">暂无开奖结果</ul>
									</div>
									
									<div class="stc_2" style="display:none;">
										<table class="top10-order">
											<thead class="top10-order-header">
												<tr class="top10-tr">
													<th class="top10-td-1">时间</th>
													<th class="top10-td-2">赔率</th>
													<th class="top10-td-3 noborder">金额</th>
												</tr>
											</thead>
											<tbody class="top10-order-content">
												<!-- ko if:top10().length===0 -->
												<tr><td colspan="3" class="top10T noborder">暂无最新注单信息</td></tr>
												<!-- /ko -->
												<!-- ko foreach:top10 -->
												<tr class="top10-tr">
													<td class="top10-td-1 bdtop" align="center" data-bind="text:cTime"></td>
													<td class="top10-td-2 bdtop" align="center" data-bind="text:odds"></td>
													<td class="top10-td-3 bdtop" align="center" data-bind="text:amount"></td>
												</tr>
												<tr><td colspan="3" class="top10-td-4 bdbottom" data-bind="text:content"></td></tr>
												<!-- /ko -->
											</tbody>
											<tfoot class="top10-order-content">
												<!-- ko if:top10().length > 0 -->
												<tr><td colspan="3" class="top10T noborder"><a href="{U('member/order')}">更多记录</a></td></tr>
												<!-- /ko -->
											</tfoot>
										</table>
										<script>
											var top10orders = [];
										</script>
									</div>
								</div>
							</div>
						</div>
						
						<div class="side_menu" id="sideMenu">
							<div class="sidem_item sidem_item_5">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>低频彩</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 5}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_1">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>时时彩</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 1}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_2">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>分分彩</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 2}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_3">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>PK拾</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 3}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_3">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>PC蛋蛋</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 8}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_4">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>快乐彩</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 4}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_6">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>11选5</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 6}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
							<div class="sidem_item sidem_item_7">
								<a href="javascript:;" class="sidem_b clear"><i></i><span>快三</span></a>
								<ul>
									{loop $lottery as $val}
										{if $val['credit'] && $val['tid'] == 7}
											<li>
												<a{if $val['id'] == $data['id']} class="active"{/if} data-key="{$val['id']}" data-val="{$val['title']}" href="{U('/lottery/view',['id'=>$val['id']])}"><span><i></i>{$val['title']}</span></a>
											</li>
										{/if}
									{/loop}
								</ul>
							</div>
						</div>
					</div>
				</div>
				<div class="ui-main clear" id="UIMain">